package com.lam.system.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lam.common.base.domain.BaseEntity;
import com.lam.common.base.domain.tree.BaseTree;
import com.lam.common.utils.DateUtil;

/**
 * 前端菜单对象 sys_front_menu
 * 
 * @author cl
 * @date 2022-08-25
 */
@TableName("sys_front_menu")
public class SysFrontMenu extends BaseTree<SysFrontMenu> implements BaseEntity{

    /** 主键 */
    @TableId(type = IdType.AUTO)
    private String id;
    
    /** 上一级Id */
    @Size(max = 32, message = "上一级Id长度不能超过32个字符")
    private String parentId;

    /** 菜单编码 */
    @NotBlank(message = "菜单编码不能为空")
    @Size(max = 32, message = "菜单编码长度不能超过32个字符")
    private String menuCode;

    /** 菜单名称 */
    @NotBlank(message = "菜单名称不能为空")
    @Size(max = 100, message = "菜单名称长度不能超过100个字符")
    private String menuName;

    /** 颜色 */
    @Size(max = 20, message = "颜色长度不能超过20个字符")
    private String menuColor;

    /** 菜单图标 */
    @Size(max = 100, message = "菜单图标长度不能超过100个字符")
    private String menuIcon;

    /** 链接 */
    @Size(max = 255, message = "链接长度不能超过255个字符")
    private String url;
    
    private BigDecimal sortNo;

    /** 创建时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /** 更新时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    /** 创建人 */
    private String createBy;

    /** 更新人 */
    private String updateBy;

    /** 备注信息 */
    @Size(max = 100, message = "备注信息长度不能超过100个字符")
    private String remark;


    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    } 

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getParentId() {
        return parentId;
    }    
    
    public void setMenuCode(String menuCode) {
        this.menuCode = menuCode;
    }

    public String getMenuCode() {
        return menuCode;
    }    
    
    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public String getMenuName() {
        return menuName;
    }    
    
    public void setMenuColor(String menuColor) {
        this.menuColor = menuColor;
    }

    public String getMenuColor() {
        return menuColor;
    }    
    
    public void setMenuIcon(String menuIcon) {
        this.menuIcon = menuIcon;
    }

    public String getMenuIcon() {
        return menuIcon;
    }    
    
    public void setUrl(String url) {
        this.url = url;
    }

    public String getUrl() {
        return url;
    }    
    
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }    
    
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }    
    
    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getCreateBy() {
        return createBy;
    }    
    
    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public String getUpdateBy() {
        return updateBy;
    }    
    
    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRemark() {
        return remark;
    }

	public BigDecimal getSortNo() {
		return sortNo;
	}

	public void setSortNo(BigDecimal sortNo) {
		this.sortNo = sortNo;
	}    
    

}
